package com.pengjunlee.hive.conf;

import org.apache.log4j.PropertyConfigurator;

 

public class ConfigUtil {

	public static void main(String[] args) {
		// TODO 自动生成的方法存根

	}

	public static void init() {
		
		initLog4jProperties();
		
	}
	
	
	public static void initLog4jProperties() {

		String os = System.getProperty("os.name");
		
//		if (os.toLowerCase().startsWith("win")) {
			
			String path = ConfigUtil.class.getResource("log4j.properties").getPath();
//			System.out.println("path"+path);
			
    		PropertyConfigurator.configure(path);
			
//		} else {
			
//			PropertyConfigurator.configure("/log4j.properties");
			
//		}
		

	}
	
}
